//
//  TDModalPanelViewController.m
//  iosf
//
//  Created by Yuan Ye on 12-4-5.
//  Copyright (c) 2012年 Neusoft Corporation. All rights reserved.
//

#import "TDModalPanelViewController.h"

@interface TDModalPanelViewController ()

- (void) buttonTouched:(id)sender;

@end

@implementation TDModalPanelViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
	self.view.backgroundColor = RGBCOLOR(127, 234, 145);
    UIButton *button = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
    button.frame = CGRectMake(50, 50, 50, 50);
    [button sizeToFit];
    [button addTarget:self action:@selector(buttonTouched:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button];
}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return YES;
}

#pragma mark -
#pragma mark UIActions

- (void) buttonTouched:(id)sender
{
    UIViewController *c = [[UIViewController alloc] init];
    [self.navigationController pushViewController:c animated:YES];
    [c release];
}
@end
